Skip to content

Integrate toast notifications for API error handling#1102

Open
gciotola wants to merge 2 commits intomainfrom
toast-api-errors
Open

Integrate toast notifications for API error handling#1102
gciotola wants to merge 2 commits intomainfrom
toast-api-errors

Conversation

@gciotola
Copy link
Copy Markdown
Contributor

@gciotola gciotola commented Apr 27, 2026

What I did

  • Improved Toast component with a new utils to check if the ToastContainer has been mounted in the app (when mounted it adds a data attribute to the body tag)
  • If ToastContainer is mouted, <HookedValidationApiError> triggers a toast instead of showing inline error when a field is not matched from the api error response

How to test

Checklist

  • Make sure your changes are tested (stories and/or unit, integration, or end-to-end tests).
  • Make sure to add/update documentation regarding your changes.
  • You are NOT deprecating/removing a feature.

@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 27, 2026

Deploy Preview for commercelayer-app-elements ready!

Name Link
🔨 Latest commit 03d2e4d
🔍 Latest deploy log https://app.netlify.com/projects/commercelayer-app-elements/deploys/69f06cf721e2650008aba5a1
😎 Deploy Preview https://deploy-preview-1102--commercelayer-app-elements.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@gciotola gciotola self-assigned this Apr 28, 2026
@gciotola gciotola added the enhancement New feature or request label Apr 28, 2026
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Apr 28, 2026

npm i https://pkg.pr.new/commercelayer/app-elements/@commercelayer/app-elements@1102

commit: 03d2e4d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants